//
// Created by spiro on 19-3-4.
//
#include <stdio.h>
#define SIZE 4
int main(void) {
    short dates[SIZE];
    short * pti;
    double bills[SIZE];
    double * ptf;

    int amount = 100;
    int * ptj;

    pti = dates;
    ptf = bills;
    ptj = &amount;

    printf("short size: %zd, double size: %zd, int size: %zd\n",
           sizeof dates[0], sizeof bills[0], sizeof amount);

    printf("dates size: %zd, bills size: %zd\n",
           sizeof dates, sizeof bills);

    printf("pti size: %zd, ptf size: %zd, ptj size: %zd\n",
           sizeof pti, sizeof ptf, sizeof ptj);

    printf("%23s %15s %15s\n", "short", "double", "int");
    for (int i = 0; i < SIZE; ++i) {
        printf("pointers + %d: %10p %10p %10p\n", i, pti + i, ptf + i, ptj + i);
    }
    return 0;
}
